import sendMsg from "../utils/sendMsg";
export const mediaMsg= (vm,mediapath)=>{
	mediapath.forEach((item) => {
		console.log('发图' + JSON.stringify(mediapath.length));
		var messageType = 3;
		var content = {
			mediaPath: item
		};
		const msg = sendMsg(messageType, vm.toTarget, content);
		vm.messages.push(msg);
		if (vm.stateConfig.isSound===1) {
			vm.playNotificationSound('send');
		}else if(vm.stateConfig.isSound===2){
			uni.vibrateShort()
		}
	});
	vm.$nextTick(() => {
		uni.pageScrollTo({
			scrollTop: 9999,
			duration: 100
		});
	});
	
	
	
}